package com.bootx.pojo;

public class MyChatMessage {

    private String finishReason;
    private String msgId;
    private String text;
    private String messageType;
    private Integer completionTokens;
    private Integer promptTokens;
    private Integer totalTokens;
    private Boolean isUser;

    public String getFinishReason() {
        return finishReason;
    }

    public void setFinishReason(String finishReason) {
        this.finishReason = finishReason;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public Integer getCompletionTokens() {
        return completionTokens;
    }

    public void setCompletionTokens(Integer completionTokens) {
        this.completionTokens = completionTokens;
    }

    public Integer getPromptTokens() {
        return promptTokens;
    }

    public void setPromptTokens(Integer promptTokens) {
        this.promptTokens = promptTokens;
    }

    public Integer getTotalTokens() {
        return totalTokens;
    }

    public void setTotalTokens(Integer totalTokens) {
        this.totalTokens = totalTokens;
    }

    public Boolean getUser() {
        return isUser;
    }

    public void setUser(Boolean user) {
        isUser = user;
    }

    public static MyChatMessage userMessage(String text, String msgId) {
        MyChatMessage myChatMessage = new MyChatMessage();
        myChatMessage.text = text;
        myChatMessage.msgId = msgId;
        myChatMessage.messageType = "USER";
        myChatMessage.isUser = true;
        return myChatMessage;
    }

    public static MyChatMessage aiMessage(String text, String msgId) {
        MyChatMessage myChatMessage = new MyChatMessage();
        myChatMessage.text = text;
        myChatMessage.msgId = msgId;
        myChatMessage.messageType = "ASSISTANT";
        myChatMessage.isUser = false;
        return myChatMessage;
    } 
}
